package com.demo.quartz.jobs;

import org.quartz.*;

/**
 * @author chenx
 * @Description :
 * @create 2020-05-15 16:32
 */
public class DumbJob2 implements Job {

    public DumbJob2(){

    }
    public void execute(JobExecutionContext context) throws JobExecutionException {
        //@do something

        JobKey key = context.getJobDetail().getKey();

        JobDataMap dataMap = context.getJobDetail().getJobDataMap();

        String jobSays = dataMap.getString("jobSays");
        float myFloatValue = dataMap.getFloat("myFloatValue");

        System.out.println("Instance " + key + " of DumbJob says: " + jobSays + ", and val is: " + myFloatValue);
    }

}
